<template>
  <van-row type="flex" align="center" @click="handleClick">
    <van-col :span="23">
      <div class="L-text L-bold" v-html="item.title"></div>
      <div v-if="item.value">
        <span class="L-secondary-text-color L-small-text" v-html="item.value"></span>
      </div>
      <template v-if="item.label">
        <div class="L-secondary-text-color L-small-text" v-html="item.label"></div>
      </template>
    </van-col>
    <van-col :span="1">
      <i class="iconfont icon-jiufuqianbaoicon07"></i>
    </van-col>
  </van-row>

</template>

<script setup lang="ts">
import { onMounted, ref, defineProps } from "vue";
import { useRouter, useRoute } from "vue-router";
import emitter from "@/utils/emitter";

const router = useRouter();
const route = useRoute();

import { useCheck } from "@/hooks/hooks.js";
const { checkCustomized } = useCheck();

const props = defineProps({
  item: {
    type: Object,
    default: {},
  },
  idobject: {
    type: [String,Array],
    default: "",
  },
  idtemplate: {
    type: [String, Array],
    default: "",
  },

  
});

function handleClick() {

  const { item, idobject,idtemplate } = props;

  const path = checkCustomized(`/${props.idobject}Card`)
    ? `/${props.idobject}Card`
    : "defaultCard";
    router.push({
      path: path,
      query: {
        itemid: item[`${idobject}_id`],
        idobject,
        idtemplate,
      },
    });

}
</script>

<style scoped>
</style>